"""
URL configuration for djangoProject02 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from app01.views import Department,PhoneNumber,usersInfo,Admin_1,Admin_2,account,task
urlpatterns = [
    # path("admin/", admin.site.urls),
    #部门管理
    path("depart/list/", Department.depart_list),
    path("depart/add/", Department.depart_add),
    path("depart/del/", Department.depart_del),
    #http://localhost:8000/depart/数字/edit/
    path("depart/<int:nid>/edit/", Department.depart_edit),

    #用户管理
    path("user/list/",usersInfo.user_list),
    path("user/add/",usersInfo.user_add),
    path("user/modelform/add/",usersInfo.user_modelform_add),
    path("user/<int:nid>/edit/",usersInfo.user_edit),
    path("user/<int:nid>/del/",usersInfo.user_del),

    #靓号管理
    path("phonenum/list/",PhoneNumber.phonenum_list),
    path("phonenum/add/",PhoneNumber.phonenum_add),
    path("phonenum/<int:nid>/del/",PhoneNumber.phonenum_del),
    path("phonenum/<int:nid>/edit/",PhoneNumber.phonenum_edit),

    #管理员的管理
    path('admin/list/',Admin_1.adminuser_list),
    path('admin/add/',Admin_1.adminuser_add),
    path('admin/<int:nid>/edit/',Admin_1.adminuser_edit),
    path('admin/<int:nid>/del/',Admin_1.adminuser_del),
    path('admin/<int:nid>/reset/',Admin_1.adminuser_reset),

    #登录
    path('login/',account.login),
    path('logout/',account.logout),
    path('image/code/',account.image_code),

    #任务管理
    path('task/list/',task.task_list),
    path('task/ajax/',task.task_ajax),
    path('task/add/',task.task_add),

]
